<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   文本三巨头：zsh、tmux 和 vim  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/16727.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466459609: Accept with keywords: (title(0.25):社区,文本,数盟,巨头, topn(0.133333333333):插件,数盟,巨头,行业资讯,工具,目录,文件,颜色,状态栏,配置文件,文本编辑,模式,远程,终端,文章,窗格,社区,项目,内建,功能,链接,前缀,剪贴板,主题,系统,内容,版本,屏幕,文本,粘贴).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    文本三巨头：zsh、tmux 和 vim
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    文本三巨头：zsh、tmux 和 vim | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,67] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/16727.html">
          文本三巨头：zsh、tmux 和 vim
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          2,616 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech" rel="category tag">
          文章
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <h3>
        罗马三巨头
       </h3>
       <p>
        公元前62年，
        <a href="http://en.wikipedia.org/wiki/Julius_Caesar" rel="external nofollow">
         凯撒
        </a>
        组建了一个包含了他自己， 政治家
        <a href="http://en.wikipedia.org/wiki/Marcus_Licinius_Crassus" rel="external nofollow">
         克拉苏
        </a>
        ，以及军事领袖
        <a href="http://en.wikipedia.org/wiki/Pompey" rel="external nofollow">
         庞培
        </a>
        三人的政治联盟。 这三个人一起组成了一个秘密政治小组，称为
        <a href="http://en.wikipedia.org/wiki/First_Triumvirate" rel="external nofollow">
         Triumvirate
        </a>
        （三巨头），来统治
        <a href="http://en.wikipedia.org/wiki/Roman_Republic" rel="external nofollow">
         罗马共和国
        </a>
        。 而文本三巨头则是
        <a href="http://www.zsh.org/" rel="external nofollow">
         zsh
        </a>
        、
        <a href="http://www.vim.org/" rel="external nofollow">
         vim
        </a>
        和
        <a href="http://tmux.sourceforge.net/" rel="external nofollow">
         tmux
        </a>
        。 这三个令人尊敬的工具本身已经非常强大，然而它们的组合却更加所向披靡，把其他文本编辑组合甩开了 N 条街。本文旨在向刚接触各类工具的新手们简述如何建立一个既强大又容易配置的文本三巨头。我想把主要的篇幅放在如何将 zsh、vim 和 tmux 整合起来，并主要讲述了我如何解决两个常见的问题——复制/粘贴功能和颜色配置。
       </p>
       <p>
        <img src="http://dataunion.org/wp-content/uploads/2015/05/131126wjjkwgsgsz5whwr51.jpg"/>
       </p>
       <p>
        （题图来自：deviantart.net）
       </p>
       <h3>
        我的愚见
       </h3>
       <p>
        跟
        <a href="http://www.randsinrepose.com/archives/2009/11/02/the_foamy_rules_for_rabid_tools.html" rel="external nofollow">
         Rands
        </a>
        一样，我对工具非常痴狂。我认为文本三巨头是最强大的文本编辑的工具链。如果你不使用这个工具链，那么我会建议你先干了这杯酒，然后尝试使用文本三巨头。如果你每天花费大量的时间在文本中纠缠，那么你更应该接受我的建议。一开始换工具或许会有些不习惯，但是你的努力会得到回报的。使用 zsh、vim 和 tmux 的好处就在于免费使用，速度快，可任意定制，在任何操作系统上都能使用，可在远程环境中使用，还在于可以实现远程
        <a href="http://en.wikipedia.org/wiki/Pair_programming" rel="external nofollow">
         结对编程
        </a>
        ，以及互相之间，和与 Unix 之间深度的整合。最终纯文本编辑的效率和组织性将会得到很大提升。该工具链可以完全由
        <a href="http://git-scm.com/" rel="external nofollow">
         git
        </a>
        管理，并且可以再几秒钟的时间内克隆到一台远程服务器或是一台新的机器上。总的来说，它们的这些优点让使我在写作和编程上变得更快，更有效率。
       </p>
       <p>
        文本三巨头的一个巨大的优势在于对用于管理工作环境的分屏模型的普遍使用。分屏模型管理允许tmux像粘合剂一样组织工作流。通常在一天的结尾，我会发现我留下了一些shell窗口和一大堆的临时文件，数据文件，源代码文件，文档文件，还有打开的数据库。把这些窗口一个个关掉然后第二天再把它们打开是非常痛苦的一件事。tmux和vim支持对一个特定的项目打开大量的窗格和窗口，如果你希望转换到另一个完全不同的项目，你可以从这些窗口分离出来转向另外一个项目，然后再按原样返回这些窗口。在一时间段内，我通常同时在多个工作和个人的项目上进行工作。在多个工作环境中来回切换的能力对我来说非常重要。（
        <a href="http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course" rel="external nofollow">
         Thoughtbot blog
        </a>
        中有对 tmux 中窗口和窗格的使用的讲解）
       </p>
       <p>
        下面是——包装在tmux中的zsh和vim：
       </p>
       <p>
        <img src="http://dataunion.org/wp-content/uploads/2015/05/131245bjdghuue8wjssjf7.jpg"/>
       </p>
       <p>
        该tmux会话中有三个分别命名为demo、docs和scatch的窗口，然而在截图中只有最上面的窗口是可见的。在这个窗口中有四个分区。左上角的分区是一个zsh窗口，左下角的分区是一个交互的python会话，右上角的窗格是用vim打开的python代码，然后右下角是包含markdown文档的窗格。
       </p>
       <h3>
        外观设置
       </h3>
       <p>
        我建议给文本三巨头设置两种颜色主题——一个主题给工作上的项目而另外一个给个人项目。我是
        <a href="http://en.wikipedia.org/wiki/Context-dependent_memory" rel="external nofollow">
         情景依赖记忆
        </a>
        的重度使用者，因此使用两个主题在认识和区分工作项目和个人项目上给予我很大的帮助。如图，下面是我的个人主题（左），以及工作主题（右）。两个主题都是Ethan Schoonover 的
        <a href="http://ethanschoonover.com/solarized" rel="external nofollow">
         solarized
        </a>
        项目中的版本。我在玩的时候使用暗调主题，是因为我通常在清晨或傍晚天空还处在黑暗中时搞自己的项目。暗调主题可以在这些时候让我的眼睛得到舒缓。关于字体，我用的是 14 point 的
        <a href="http://levien.com/type/myfonts/inconsolata.html" rel="external nofollow">
         Inconsolata
        </a>
        。
       </p>
       <p>
        <img src="http://dataunion.org/wp-content/uploads/2015/05/131245jck00m4kmvrmm2v2.jpg"/>
       </p>
       <h3>
        <p name="setup">
        </p>
        安装
       </h3>
       <p>
        首先要做的事将
        <a href="http://www.drbunsen.org/remap-capslock.html" rel="external nofollow">
         大写锁定键
        </a>
        <a href="http://www.drbunsen.org/remap-capslock.html" rel="external nofollow">
         （Caps Lock）
        </a>
        重映射到Control 键上。大写锁定键是个
        <a href="http://capsoff.org/history" rel="external nofollow">
         历史遗留问题
        </a>
        ，这个在键盘上的黄金位置的键需要被更好的利用。在tmux中对Control键的使用非常频繁，因此将Control键重映射到一个符合人体工程学的位置对我们很有帮助。
       </p>
       <p>
        想要给三巨头创建一个强大的工作环境，我们可以下载
        <a href="http://www.iterm2.com/" rel="external nofollow">
         iTerm2
        </a>
        终端模拟器。iTerm2 比普通的终端应用具有更强的性能，更多的特性和更灵活的定制化。当你开始使用iTerm2时，请回头阅读
        <a href="http://www.iterm2.com/#/section/documentation" rel="external nofollow">
         全部文档
        </a>
        看看它能为你做什么。其中一个特性是
        <code>
         Command-?
        </code>
        ，显示出一个视窗帮助你快速地找到你当前的光标位置。大部分iTerm2非常酷炫的功能本文都没有提及。请确保你了解了iTerm2的即时回放，正则查询，点击打开URL，以及标记跳转的功能。
       </p>
       <p>
        当iTerm2安装完成，即可添加亮调和暗调主题。solarized 库中含有iTerm2调色板和 配置iTerm2主题的
        <a href="https://github.com/altercation/solarized/tree/master/iterm2-colors-solarized" rel="external nofollow">
         说明
        </a>
        ，所以它的安装简洁明了。另一项对使用iTerm2有用的配置是启用系统级别的绑定键，通过该键可以让iTerm2转为最前面的窗口。我发觉设置一个具体的绑定比使用应用切换器（Command-Tab）要快的多。该设置在
        <code>
         Preferences &gt; Keys
        </code>
        中，而我使用的绑定键是
        <code>
         Option-t
        </code>
        。关于自定义，我还有一个建议，那就是在
        <code>
         Profiles &gt; Terminal &gt; Notifications
        </code>
        中撤销选中iTerm2 的响铃声。
       </p>
       <p>
        由于文本三巨头的操作高度集中在键盘上，因此，在你配置和形成自己的肌肉记忆之前，将iTerm, zsh, vim, tmux,和其他任何你之前使用的工具之间的快捷键冲突消除是非常明智的选择。做窗口移动时，我使用Option 键。
        <code>
         Option-t
        </code>
        将iTerm2移到屏幕前，而
        <code>
         Option-i
        </code>
        将Twitter移到屏幕前，等等。我还使用
        <a href="http://manytricks.com/moom/" rel="external nofollow">
         Moom
        </a>
        作为我在OS X上的平铺式窗口管理器，并将所有的快捷键配置为使用Option 键将窗口移至屏幕上特定的展示窗口或位置上。
       </p>
       <p>
        接下来，安装
        <a href="http://mxcl.github.com/homebrew/" rel="external nofollow">
         Homebrew
        </a>
        然后使用它去安装git，MacVim，tmux和reattach-to-user-namespace（返回用户命名空间）。安装MacVim有两个原因。第一，默认的OS X自带的vim似乎对很多人来说很慢。我发现使用MacVim中的vim比OS X版本的vim要快很多。另外一个安装MacVim的好处是你的系统将得到一个更新版本的vim。第二个原因则是复制/粘贴的使用在OS X版本的vim中并没有得到优化。
       </p>
       <p>
        安装完git，就可以新建一个存储库来放置文本三巨头的设置文件。我的存储库命名为
        <em>
         dotfiles
        </em>
        并存储了我的所有zsh, vim, and tmux配置文件。如果你不知道怎么为你的文件设置版本控制，请阅读
        <a href="http://progit.org/book/" rel="external nofollow">
         Pro Git
        </a>
        或者
        <a href="http://gitimmersion.com/" rel="external nofollow">
         Git Immersion
        </a>
        。
       </p>
       <h3>
        <p name="zsh">
        </p>
        ZSH
       </h3>
       <p>
        已经有很多文章写到了如何使用zsh以及为什么zsh比bash强大。基本上，bash有的功能zsh都有，而且zsh的一些特性bash是没有的。我使用zsh而不是bash是因为它有扩展的globbing（通配符），更好用的tab补全，内建的拼写纠正，一个更好的计算器（zcalc），以及一个内建的批重命名文件工具（zmv）。zsh的另外一个杀手级特色是
        <a href="https://github.com/robbyrussell/oh-my-zsh" rel="external nofollow">
         oh-my-zsh
        </a>
        ——一个zsh的社区驱动的框架。oh-my-zsh预先打包好了很不错的主题，插件，以及让zsh极度强大的配置。如果你想学习本文的话，请安装iTerm2并将zsh作为你的默认shell。
       </p>
       <p>
        我将我的 .zshrc、 .vimrc 和 .tmux.conf 配置文件保存在 dotfiles 目录中，并用 symlink 在 home 目录下创建链接。这样我就能只在一个目录里做zsh、vim 和tmux的配置的版本控制了。文本三巨头使用了vim，那么我们应该让zsh和tmux也使用vim以及它的绑定键并将vim设置为默认编辑器。将下面的文本加到.zshrc文件中，让zsh支持vim:
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76ec80732197686" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          export EDITOR="vim"
bindkey -v 
 
# vi style incremental search
bindkey '^R' history-incremental-search-backward
bindkey '^S' history-incremental-search-forward
bindkey '^P' history-search-backward
bindkey '^N' history-search-forward
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76ec80732197686-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec80732197686-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec80732197686-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec80732197686-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec80732197686-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec80732197686-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec80732197686-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec80732197686-8">
               8
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76ec80732197686-1">
               <span class="crayon-e">
                export
               </span>
               <span class="crayon-v">
                EDITOR
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "vim"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec80732197686-2">
               <span class="crayon-v">
                bindkey
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                v
               </span>
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec80732197686-3">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec80732197686-4">
               <span class="crayon-p">
                # vi style incremental search
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec80732197686-5">
               <span class="crayon-i">
                bindkey
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '^R'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                history
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                incremental
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                search
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                backward
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec80732197686-6">
               <span class="crayon-i">
                bindkey
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '^S'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                history
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                incremental
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                search
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                forward
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec80732197686-7">
               <span class="crayon-i">
                bindkey
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '^P'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                history
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                search
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                backward
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec80732197686-8">
               <span class="crayon-i">
                bindkey
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '^N'
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                history
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                search
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                forward
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0123 seconds] -->
       <p>
        zsh不仅支持大多数bash命令，还支持更多的智能命令。比如，如果你想在bash中移动到一个目录里，你可能会输入
        <code>
         cd foo
        </code>
        。而在zsh中如果你将下面一行加入到.zshrc中，你只需要输入
        <code>
         foo
        </code>
        即可。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76ec93951369180" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          setopt AUTO_CD
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76ec93951369180-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76ec93951369180-1">
               <span class="crayon-e">
                setopt
               </span>
               <span class="crayon-v">
                AUTO_CD
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0006 seconds] -->
       <p>
        为了设置一个好的命令行提示，我参考了
        <a href="http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/" rel="external nofollow">
         Steve Losh’s excellent prompt
        </a>
        然后做了一些小改动。只需要简单地在
        <code>
         oh-my-zsh/themes/
        </code>
        中创建一个新的主题文件并在你的zshrc文件中添加一行对应你的主题文件的文本（
        <code>
         ZSH_THEME=bunsen
        </code>
        ）。这是我的修改后的Steve的命令行提示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76ec9a181528673" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-mixed-highlight" title="含多种语言">
          </span>
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          function virtualenv_info {
    [ $VIRTUAL_ENV ] &amp;amp;&amp;amp; echo '('`basename $VIRTUAL_ENV`') '
}
 
function box_name {
    [ -f ~/.box-name ] &amp;amp;&amp;amp; cat ~/.box-name || hostname -s
}
 
PROMPT='
%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}$(box_name)%{$reset_color%} in %{$
fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
$(virtualenv_info)%(?,,%{${fg_bold[blue]}%}[%?]%{$reset_color%} )$ '
 
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN=""
 
local return_status="%{$fg[red]%}%(?..⤬)%{$reset_color%}"
RPROMPT='${return_status}%{$reset_color%}'
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ec9a181528673-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ec9a181528673-22">
               22
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-1">
               <span class="crayon-t">
                function
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                virtualenv_info
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                VIRTUAL
               </span>
               <span class="crayon-sy">
                _
               </span>
               ENV
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                echo
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '('
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-i">
                basename
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-v">
                VIRTUAL_ENV
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-s">
                ') '
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-3">
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-4">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-5">
               <span class="crayon-t">
                function
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                box_name
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                f
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                ~
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                box
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                name
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                amp
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                cat
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                ~
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                box
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                name
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                ||
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                hostname
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                s
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-7">
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-8">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-9">
               <span class="crayon-v">
                PROMPT
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-10">
               <span class="crayon-s">
                <span class="crayon-ta">
                 %
                </span>
                <span class="crayon-k ">
                 {
                </span>
                <span class="crayon-v">
                 $fg
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 magenta
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 }
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-v">
                 n
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 {
                </span>
                <span class="crayon-v">
                 $reset_color
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 }
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 at
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 {
                </span>
                <span class="crayon-v">
                 $fg
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 yellow
                </span>
                <span class="crayon-sy">
                 ]
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 }
                </span>
                <span class="crayon-sy">
                 $
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 box_name
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 {
                </span>
                <span class="crayon-v">
                 $reset_color
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 }
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-st">
                 in
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-k ">
                 {
                </span>
                <span class="crayon-sy">
                 $
                </span>
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-11">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-12">
               <span class="crayon-s">
                fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-13">
               <span class="crayon-s">
                $(virtualenv_info)%(?,,%{${fg_bold[blue]}%}[%?]%{$reset_color%} )$ '
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-14">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-15">
               <span class="crayon-v">
                ZSH_THEME_GIT_PROMPT_PREFIX
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                " on %{$fg[magenta]%}"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-16">
               <span class="crayon-v">
                ZSH_THEME_GIT_PROMPT_SUFFIX
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "%{$reset_color%}"
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-17">
               <span class="crayon-v">
                ZSH_THEME_GIT_PROMPT_DIRTY
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "%{$fg[green]%}!"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-18">
               <span class="crayon-v">
                ZSH_THEME_GIT_PROMPT_UNTRACKED
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "%{$fg[green]%}?"
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-19">
               <span class="crayon-v">
                ZSH_THEME_GIT_PROMPT_CLEAN
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                ""
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-20">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ec9a181528673-21">
               <span class="crayon-e">
                local
               </span>
               <span class="crayon-v">
                return_status
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "%{$fg[red]%}%(?..⤬)%{$reset_color%}"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ec9a181528673-22">
               <span class="crayon-v">
                RPROMPT
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                '${return_status}%{$reset_color%}'
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0325 seconds] -->
       <p>
       </p>
       <h3>
        VIM
       </h3>
       <p>
        下面我会将注意力放在vim与文本三巨头的整合而不是vim本身。为了将solarized整合到vim中，你需要安装
        <a href="https://github.com/altercation/vim-colors-solarized" rel="external nofollow">
         vim solarized plugin
        </a>
        然后将下面的内容放到你的vimrc里：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76eca3652019605" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          syntax enable
let g:solarized_termtrans = 1
colorscheme solarized
togglebg#map("&amp;lt;F5&amp;gt;")
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76eca3652019605-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76eca3652019605-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-576865d76eca3652019605-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76eca3652019605-4">
               4
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76eca3652019605-1">
               <span class="crayon-e">
                syntax
               </span>
               <span class="crayon-e">
                enable
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76eca3652019605-2">
               <span class="crayon-i">
                let
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                g
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-v">
                solarized_termtrans
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76eca3652019605-3">
               <span class="crayon-e">
                colorscheme
               </span>
               <span class="crayon-e">
                solarized
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76eca3652019605-4">
               <span class="crayon-v">
                togglebg
               </span>
               <span class="crayon-p">
                #map("&amp;lt;F5&amp;gt;")
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0011 seconds] -->
       <p>
        终端中的颜色管理会比较复杂。在我的系统中，为了在终端的vim中得到合适的颜色渲染，我特地加了
        <code>
         let g:solarized_termtrans = 1
        </code>
        。Solarized 提供了内建后台函数，让你可以使用
        <code>
         &amp;lt;F5&amp;gt;
        </code>
        在亮调和暗调主题之间切换，因此如果你需要这个功能就需要加上上面的内容的最后一行。你还可以在vim里运行
        <code>
         :set background=dark
        </code>
        或者
        <code>
         :set background=light
        </code>
        去实现同样的功能。
       </p>
       <p>
        vim对复制/粘贴的处理跟基于GUI的文本编辑器有些不同。vim有许多复制寄存器和一些粘贴模式，而不是一个单一的复制/粘贴机制。我向我的vimrc里添加了下列内容，使复制/粘贴机制更加直观。
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76ecaa689011403" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          " Yank text to the OS X clipboard" 将文本复制到OS X剪贴板中
noremap &amp;lt;leader&amp;gt;y "*y
noremap &amp;lt;leader&amp;gt;yy "*Y
 
" Preserve indentation while pasting text from the OS X clipboard 在粘贴OS X剪贴板中的文本时保留缩进
noremap &amp;lt;leader&amp;gt;p :set paste&amp;lt;CR&amp;gt;:put *&amp;lt;CR&amp;gt;:set nopaste&amp;lt;CR&amp;gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76ecaa689011403-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecaa689011403-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecaa689011403-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecaa689011403-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecaa689011403-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecaa689011403-6">
               6
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76ecaa689011403-1">
               <span class="crayon-s">
                " Yank text to the OS X clipboard"
               </span>
               <span class="crayon-h">
               </span>
               将文本复制到
               <span class="crayon-i">
                OS
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                X
               </span>
               剪贴板中
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecaa689011403-2">
               <span class="crayon-v">
                noremap
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                leader
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-i">
                y
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "*y
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecaa689011403-3">
               <span class="crayon-s">
                noremap &amp;lt;leader&amp;gt;yy "
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-i">
                Y
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecaa689011403-4">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecaa689011403-5">
               "
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Preserve
               </span>
               <span class="crayon-e">
                indentation
               </span>
               <span class="crayon-st">
                while
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                pasting
               </span>
               <span class="crayon-e">
                text
               </span>
               <span class="crayon-e">
                from
               </span>
               <span class="crayon-e">
                the
               </span>
               <span class="crayon-i">
                OS
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                X
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                clipboard
               </span>
               <span class="crayon-h">
               </span>
               在粘贴
               <span class="crayon-i">
                OS
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                X
               </span>
               剪贴板中的文本时保留缩进
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecaa689011403-6">
               <span class="crayon-v">
                noremap
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                leader
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                p
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-e">
                set
               </span>
               <span class="crayon-v">
                paste
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                CR
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-e ">
                put *
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                CR
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-e">
                set
               </span>
               <span class="crayon-v">
                nopaste
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                CR
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0135 seconds] -->
       <p>
        上面的映射大幅提升了OS X系统剪贴板的可用性。前两个命令分别复制选中的文本或一行内容到系统剪贴板中。最后一行则使粘贴的文本的格式维持不变。在实践中我发现我并不需要进行很多对vim里外文本的粘贴。如果我需要分享代码，我通常会使用
        <a href="https://github.com/mattn/gist-vim" rel="external nofollow">
         vim gist plugin
        </a>
        ，这比复制/粘贴要快多了。
       </p>
       <h3>
        <p name="tmux">
        </p>
        TMUX
       </h3>
       <p>
        tmux像胶水一样将文本三巨头紧密联系在一起。我在上个月才开始使用tmux，但我惊讶地发现它现在对我的工作流来说是如此的不可或缺。下面是维基百科对tmux的描述：
       </p>
       <blockquote>
        <p>
         tmux是一个用于终端复用的软件，它允许一个用户在一个终端窗口或远程终端会话中使用多个不同的终端会话。在同一个命令行接口处理多个程序，以及将程序从已经开始运行另外的程序的Unix shell中分离出来，是非常有用的。
        </p>
       </blockquote>
       <p>
        从本质上来说，tmux允许你创建会话，只要你愿意，你可以随时离开或返回该会话。tmux非常的宝贵，因为你可以根据上下文去安排你的工作。
       </p>
       <p>
        就像vim一样，设置和使用tmux最难的部分就是颜色管理和用到系统剪贴板的复制/粘贴功能。通过确保tmux知道你使用的256色来创建合适的solarized颜色是非常简单直白的。将下面的内容添加到你的tmux.conf文件中：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76ecb1063909162" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          set -g default-terminal "screen-256color"
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76ecb1063909162-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76ecb1063909162-1">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                default
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                terminal
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "screen-256color"
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0129 seconds] -->
       <p>
        关于复制/粘贴，tmux有一个特别的复制模式。tmux的复制模式命令以一个前缀键开头。默认的前缀键是
        <code>
         Control-b
        </code>
        。大多数人，包括我自己，都会重映射前缀键为
        <code>
         Control-a
        </code>
        ，因为这样容易使用多了，而且这还是GNU screen的默认绑定键。当你看到我在下面提到
        <code>
         prefix
        </code>
        ，我指的都是
        <code>
         Control-a
        </code>
        。因此
        <code>
         &amp;lt;prefix&amp;gt; c
        </code>
        的意思就是：点击
        <code>
         Control-a
        </code>
        再点击
        <code>
         c
        </code>
        。
       </p>
       <p>
        tmux里的复制/粘贴在OS X中完全不起作用。幸运的是，Chris Johnsen创建了一个好用的，很容易通过 Homebrew 安装的补丁，名为
        <a href="https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard" rel="external nofollow">
         reattach-to-user-namespace
        </a>
        （返回到用户命名空间）。
        <a href="http://thoughtbot.com/" rel="external nofollow">
         Thoughtbot
        </a>
        里的人们有一些很实用的博文解释了如何使用tmux和如何使复制/粘贴功能运行起来（看
        <a href="http://robots.thoughtbot.com/post/2641409235/a-tmux-crash-course" rel="external nofollow">
         这
        </a>
        和
        <a href="http://robots.thoughtbot.com/post/2166174647/love-hate-tmux" rel="external nofollow">
         这
        </a>
        ）。然而读完这些教程，我开始还是没搞懂如何在OS X剪切板中使用tmux，因此下面就是你安装完 reattach-to-user-namespace 后，你需要向你的tmux.conf文件中添加的内容：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76ecb9372596835" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          set -g default-command "reattach-to-user-namespace -l zsh"
 
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
 
# Copy mode
setw -g mode-keys vi
bind ` copy-mode
unbind [
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -t vi-copy Escape cancel
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecb9372596835-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecb9372596835-16">
               16
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-1">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                default
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                command
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "reattach-to-user-namespace -l zsh"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-2">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-3">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                mode
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                mouse
               </span>
               <span class="crayon-e">
                on
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-4">
               <span class="crayon-v">
                setw
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                mouse
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                select
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                window
               </span>
               <span class="crayon-e">
                on
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-5">
               <span class="crayon-v">
                setw
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                mouse
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                select
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                pane
               </span>
               <span class="crayon-v">
                on
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-6">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-7">
               <span class="crayon-p">
                # Copy mode
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-8">
               <span class="crayon-v">
                setw
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                mode
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                keys
               </span>
               <span class="crayon-e">
                vi
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-9">
               <span class="crayon-i">
                bind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                `
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                copy
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                mode
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-10">
               <span class="crayon-i">
                unbind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                [
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-11">
               <span class="crayon-i">
                unbind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                p
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-12">
               <span class="crayon-i">
                bind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                p
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                paste
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                buffer
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-13">
               <span class="crayon-v">
                bind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                t
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                vi
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                copy
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                v
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                begin
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                selection
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-14">
               <span class="crayon-v">
                bind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                t
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                vi
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                copy
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                y
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                copy
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                selection
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecb9372596835-15">
               <span class="crayon-v">
                bind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                t
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                vi
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                copy
               </span>
               <span class="crayon-e">
                Escape
               </span>
               <span class="crayon-e">
                cancel
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecb9372596835-16">
               <span class="crayon-i">
                bind
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                y
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                run
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "tmux save-buffer - | reattach-to-user-namespace pbcopy"
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0329 seconds] -->
       <p>
        第一行设置令tmux使用 wrapper 程序给每个新打开的tmux窗口去启动zsh。接下来的三行是我个人对tmux里鼠标操作的设置。你可以保留或删掉这三行，这取决于你自己的需求。真正的干货在接下来的十行，它们用于处理复制模式。
       </p>
       <p>
        除了vim和OS X的复制/粘贴缓存外，tmux有它自己的复制/粘贴缓存。为了高效地使用tmux缓存，可以点击
        <code>
         ` 键
        </code>
        来进入复制模式。我已经将默认的复制绑定重映射为跟vi类似的绑定。为了将文本放入tmux的复制/粘贴缓存中，可以点击
        <code>
         v
        </code>
        去做出文本的选定然后点击
        <code>
         y
        </code>
        复制选中项。此时，所选的文本就被放在tmux复制/粘贴缓存中。输入
        <code>
         &amp;lt;prefix&amp;gt; p
        </code>
        可以粘贴该文本。不过，如果你想将文本放入OS X的复制/粘贴缓存里，你需要输入
        <code>
         &amp;lt;prefix&amp;gt; y
        </code>
        。
       </p>
       <h3>
        插件
       </h3>
       <p>
        要是我没提及一些非常棒的特别与文本三巨头融合的很好的开源项目，就是我的不对了。我就不深入地一个一个说这些工具了，下面是一些我最喜欢的项目的链接以及简介：
       </p>
       <ul>
        <li>
         <a href="http://betterthangrep.com/" rel="external nofollow">
          Ack
         </a>
         —比grep要好
        </li>
        <li>
         <a href="https://github.com/joelthelion/autojump/wiki/" rel="external nofollow">
          Autojump
         </a>
         —目录导航
        </li>
        <li>
         <a href="https://wincent.com/blog/tweaking-command-t-and-vim-for-use-in-the-terminal-and-tmux" rel="external nofollow">
          Command-t
         </a>
         —用于模糊查询的vim插件；（点击链接了解如何在tmux中设置）
        </li>
        <li>
         <a href="http://johnmacfarlane.net/pandoc/" rel="external nofollow">
          Pandoc
         </a>
         —格式转换
        </li>
        <li>
         <a href="https://github.com/Lokaltog/vim-powerline" rel="external nofollow">
          Poweline-vim
         </a>
         —定制vim状态栏
        </li>
        <li>
         <a href="http://6xq.net/projects/pianobar/" rel="external nofollow">
          Pianobar
         </a>
         —终端Pandora 音乐播放器
        </li>
        <li>
         <a href="http://pdfgrep.sourceforge.net/" rel="external nofollow">
          pdfgrep
         </a>
         &amp;mdash DF文件的grep
        </li>
        <li>
         <a href="https://github.com/antono/shelr" rel="external nofollow">
          shelr
         </a>
         —shell中的屏幕录制工具
        </li>
        <li>
         <a href="https://github.com/benmills/vimux" rel="external nofollow">
          vimux
         </a>
         —用vim与tmux交互
        </li>
        <li>
         <a href="https://github.com/pypa/virtualenv" rel="external nofollow">
          virtualenv
         </a>
         &amp;mdash ython虚拟环境创建工具
        </li>
        <li>
         <a href="https://github.com/zolrath/wemux" rel="external nofollow">
          wemux
         </a>
         —多用户终端共享器
        </li>
        <li>
         <a href="http://skwp.github.com/dotfiles/" rel="external nofollow">
          yadr
         </a>
         —一套zsh，MacVim，和git 的配置文件
        </li>
       </ul>
       <h3>
        更新
       </h3>
       <p>
        一些朋友问我如何像上面的截屏里一样在tmux中设置漂亮的状态栏。我是从
        <a href="https://github.com/zolrath/wemux" rel="external nofollow">
         wemux project
        </a>
        中学到的。如果你已经安装了
        <a href="https://github.com/Lokaltog/vim-powerline" rel="external nofollow">
         vim-powerline
        </a>
        并且正在使用补充的字体，你只需要向你的
        <code>
         tmux.conf
        </code>
        中加入下面的内容去得到我的状态栏样式。感谢
        <a href="https://github.com/zolrath" rel="external nofollow">
         Matt Furden
        </a>
        ！
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-576865d76ecc2178562590" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          set -g status-left-length 52
set -g status-right-length 451
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S
#[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami)
#[fg=colour238,bg=colour234,nobold]⮀'
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format
"#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W
#[fg=colour39,bg=colour234,nobold]⮀"
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-576865d76ecc2178562590-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-576865d76ecc2178562590-17">
               17
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-1">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                left
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                length
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                52
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-2">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                right
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                length
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                451
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-3">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                fg
               </span>
               <span class="crayon-e">
                white
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-4">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                bg
               </span>
               <span class="crayon-e">
                colour234
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-5">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                window
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                activity
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                attr
               </span>
               <span class="crayon-e">
                bold
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-6">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pane
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                border
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                fg
               </span>
               <span class="crayon-e">
                colour245
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-7">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pane
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                active
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                border
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                fg
               </span>
               <span class="crayon-e">
                colour39
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-8">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                message
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                fg
               </span>
               <span class="crayon-e">
                colour16
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-9">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                message
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                bg
               </span>
               <span class="crayon-e">
                colour221
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-10">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                message
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-e">
                attr
               </span>
               <span class="crayon-e">
                bold
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-11">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                left
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                '#[fg=colour235,bg=colour252,bold] ❐ #S
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-12">
               <span class="crayon-s">
                #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami)
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-13">
               <span class="crayon-s">
                #[fg=colour238,bg=colour234,nobold]⮀'
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-14">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                window
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                format
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "#[fg=white,bg=colour234] #I #W "
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-15">
               <span class="crayon-v">
                set
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                g
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                window
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                status
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                current
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-i">
                format
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-576865d76ecc2178562590-16">
               <span class="crayon-s">
                "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W
               </span>
              </div>
              <div class="crayon-line" id="crayon-576865d76ecc2178562590-17">
               <span class="crayon-s">
                #[fg=colour39,bg=colour234,nobold]⮀"
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0161 seconds] -->
       <p>
       </p>
       <div class="loc_link">
        <ul>
         <li>
          本文固定链接:
          <a href="http://liuyuesong.cn/2015/05/wenbensanjutouzshtmuxhevim.html" rel="bookmark" title="文本三巨头：zsh、tmux 和 vim">
           http://liuyuesong.cn/2015/05/wenbensanjutouzshtmuxhevim.html
          </a>
         </li>
         <li>
          转载请注明:
          <a href="http://liuyuesong.cn/author/root" rel="author" title="由root发布">
           root
          </a>
          <time>
           2015年05月06日
          </time>
          于
          <a href="http://liuyuesong.cn/" title="访问月松博客">
           月松博客
          </a>
          发表
         </li>
        </ul>
       </div>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/24220.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/05/100910rrxp5plglxk4lcle-291x200.png"/>
        </a>
        <a class="link" href="http://dataunion.org/24220.html" rel="bookmark" title="520大数据：八成男性期待被表白 “套路”也是爱">
         520大数据：八成男性期待被表白 “套路”也是爱
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/23785.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/04/u7145986293872240263fm21gp0-298x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/23785.html" rel="bookmark" title="Docker安全基准：22项新增要点概述">
         Docker安全基准：22项新增要点概述
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/23703.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/04/1317020-300x163.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/23703.html" rel="bookmark" title="推荐：五个不容错过的数据科学家博客">
         推荐：五个不容错过的数据科学家博客
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/23507.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/110606wjpugdldig4idddn.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/23507.html" rel="bookmark" title="解密深度学习在智能推荐系统的实践与应用">
         解密深度学习在智能推荐系统的实践与应用
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F16727.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/16727.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/16727.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>